<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东登录</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            background-color: #f8f8f8;
        }
        .login-container {
            text-align: center;
        }
        .login-title {
            font-size: 1.5em;
            margin-bottom: 20px;
        }
        .input-group {
            display: flex;
            align-items: center;
            border: 1px solid #ccc;
            border-radius: 25px;
            padding: 10px 15px;
            background-color: #fff;
            margin-bottom: 20px;
            width: 300px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .input-group input {
            border: none;
            outline: none;
            flex: 1;
        }
        .input-group img {
            width: 20px;
            height: 20px;
            margin-left: 10px;
            cursor: pointer;
        }
        .send-code {
            background-color: transparent;
            border: none;
            cursor: pointer;
            font-size: 0.9em;
            color: #007aff;
        }
        .login-button {
            background: linear-gradient(to right, #f77062, #fe5196);
            border: none;
            border-radius: 25px;
            color: white;
            padding: 10px 0;
            width: 100%;
            font-size: 1em;
            cursor: pointer;
            transition: background 0.3s;
        }
        .login-button:hover {
              /* 渐变效果 */
            background: linear-gradient(to right, #fe5196, #f77062);
          
        }
        .help-links {
            margin-top: 10px;
            font-size: 0.9em;
            color: #aaa;
         
        }
        .help-links a {
            color: #8c8d8e;
            text-decoration: none;
            margin: 0 10px;
            justify-content: space-between;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-title">京东登录</div>
        <div class="input-group">
            <input type="text" placeholder="用户名/邮箱/已验证手机">
        </div>
        <div class="input-group">
            <input type="password" placeholder="密码" >
            <img src="./image/显示密码.svg" alt="">
            <span>&ensp;|</span>
            <button class="send-code">忘记密码</button>
        </div>
        <button class="login-button">登录</button>
        <div class="help-links">
            <a href="#">短信验证登录</a>
            <a href="#">手机快速注册</a>
        </div>
    </div>
    <script>
        // 点击密码显示按钮
        const showPassword = document.querySelector('.input-group img');
        const passwordInput = document.querySelector('.input-group input[type="password"]');
        showPassword.addEventListener('click', function() {
            if (passwordInput.type === 'password') {
                passwordInput.type = 'text';
                showPassword.src = './image/不显示密码.svg';
            } else {
                passwordInput.type = 'password';
                showPassword.src = './image/显示密码.svg';
            }
            });

    </script>
</body>
</html>
